<% content_for :css do %>
  <%= stylesheet_link_tag 'users_new' %>
<style type="text/css">
#tip {
  margin-top:30px;
  border-radius:10px;
  padding:20px;
  background: #F4F1EC;
}
</style>
<% end %>
<% content_for :title do %>会员登录<% end %>
<div id='user_form' class='grid_24'>
  <div class='grid_13 push_6'>
    <div class='grid_13 pull_a_little logo'>
       <%= image_tag 'application/login.gif' %>
    </div>
    <% if @login_failed %>
    <div class="grid_10 pull_a_little error">
        企业名称、手机号和密码不匹配哦，再仔细想想。如果忘记了请
      联系管理员解决
    </div>
    <% end %>
  <%= form_for @session, :as => :session , :url => sessions_url, :method => :post do |f| %>
    <div class='grid_11'>
      <label for="session_mobile"  class='grid_10 alpha'>企业名称</label>
      <%= f.text_field :enterprise_name, :class => 't', :title => '请输入您所在的企业名称' %>
    </div>
    <div class='grid_11'>
      <label for="session_mobile"  class='grid_10 alpha'>手机号</label>
      <%= f.text_field :mobile, :class => 't', :title => '请输入您账号对应的手机号' %>
    </div>
    <div class='grid_11'>
      <label for="session_password"  class='grid_10 alpha'>密码</label>
      <%= f.password_field :password, :class => 't', :title => '请输入密码' %>
      <%= hidden_field_tag :http_referer, @http_referer  %>
    </div>
    <div class='grid_11'>
      <%= f.check_box :remember_me, {:class => :no}, 'yes','no' %> <label for="session_remember_me">下次自动登录</label>
      <%= link_to "还不是会员？1分钟就搞定！", new_user_url(:http_referer => @http_referer), :title => '只需1分钟就能注册成为会员', :class => :h1 %>
    </div>
    <div class='grid_11'>
      <button tabindex="1" class="button positive" type="submit">
        <%= image_tag 'application/lock.png' %>会员登入 </button>
    </div>
  <% end %>
  </div>
  
</div>
   <% if User.has_loggined? and User.current.status.locked? %>
    alert('您的账号已被管理员锁定，无法完成操作,请联系单位管理员解决：）');
   <% end %>
  </script>